package cn.db101.jcc.entity.table;

import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;

// Auto generate by mybatis-flex, do not modify it.
public class LineupTableDef extends TableDef {

    public final QueryColumn ID = new QueryColumn(this, "id");

    public final QueryColumn TITLE = new QueryColumn(this, "title");

    public final QueryColumn CONTENT = new QueryColumn(this, "content");

    public final QueryColumn IMAGE_URL = new QueryColumn(this, "image_url");

    /**
     * 分类ID
     */
    public final QueryColumn CATEGORY_ID = new QueryColumn(this, "category_id");

    public final QueryColumn CREATE_TIME = new QueryColumn(this, "create_time");

    public final QueryColumn UPDATE_TIME = new QueryColumn(this, "update_time");

    public final QueryColumn DESCRIPTION = new QueryColumn(this, "description");

    /**
     * 所有字段。
     */
    public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");

    /**
     * 默认字段，不包含逻辑删除或者 large 等字段。
     */
    public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, TITLE, CONTENT, IMAGE_URL, CATEGORY_ID, CREATE_TIME, UPDATE_TIME, DESCRIPTION};

    public LineupTableDef() {
        super("", "t_lineup");
    }

    private LineupTableDef(String schema, String name, String alisa) {
        super(schema, name, alisa);
    }

    public LineupTableDef as(String alias) {
        String key = getNameWithSchema() + "." + alias;
        return getCache(key, k -> new LineupTableDef("", "t_lineup", alias));
    }

}
